import server from "~/axios"

//获取视频播放地址
export const getvideoPlayback = id => server({
    url: `/video/url?id=${id}&`,
    method: "get",
})
//获取mv播放地址
export const getMVPlayback = id => server({
    url: `/mv/url?id=${id}&`,
    method: "get",
})
//获视频评论
export const SetvideoReview = id => server({
    url: `/comment/video?id=${id}&`,
    method: "get",
})
//获mv评论
export const SetmvReview = id => server({
    url: `/comment/mv?id=${id}&`,
    method: "get",
})
//给评论点赞
export const SetcommentLike = data => server({
    url: `/comment/like?id=${data.id}&cid=${data.cid}&t=${data.t}$type=${data.type}&`,
    method: "get",
})
//视频详情
export const videoDetails = id => server({
    url: `/video/detail?id=${id}&`,
    method: "get",
})
//mv详情
export const mvDetails = id => server({
    url: `/mv/detail?mvid=${id}&`,
    method: "get",
})
//调用此接口 , 可获取相关视频
export const relatedVideos = id => server({
    url: `/related/allvideo?id=${id}&`,
    method: "get",
})
//发表评论
export const publication = data => server({
    url: `/comment?t=${data.t}&type=${data.type}&id=${data.id}&content=${data.content}&`,
    method: "get",
})
//全部 mv
export const entire = data => server({
    url: `/mv/all?area=${data.area}&type=${data.type}&order=${data.order}&`,
    method: "get",
})
//相似 mv
export const similarMv = id => server({
    url: `/simi/song?id=${id}&`,
    method: "get",
})
//获取音乐 url
export const musicUrl = id => server({
    url: `/song/url?id=${id}&`,
    method: "get",
})